package org.swust.monitor.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.swust.monitor.entity.SysDept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 111
 * @since 2024-12-27
 */
@Mapper
public interface SysDeptMapper extends BaseMapper<SysDept> {
    @Update("UPDATE sys_dept SET dept_count = dept_count + #{num} WHERE dept_id = #{deptId}")
    int saveDeptCount(@Param("deptId") Integer deptId, int num);

//    @Update("UPDATE sys_dept SET dept_count = dept_count + #{num} WHERE dept_id = #{deptId}")
//    int delDeptCount(@Param("deptId") Integer deptId, int num);
}
